body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

h2 {
    color: #444;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

h3 {
    color: #555;
    margin-top: 0;
    text-align: center;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    background-color: #45a049;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.output {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
    white-space: pre-wrap;
    font-size: 13px;
}

.controls {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

input[type="number"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 60px;
}

.demo-area {
    display: flex;
    flex-direction: column;
}

.animation-box {
    height: 50px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.animation-element {
    width: 50px;
    height: 30px;
    background-color: #4CAF50;
    position: absolute;
    top: 10px;
    left: 0;
    border-radius: 4px;
    animation: moveRight 2s linear infinite;
}

.animation-element-no-worker {
    background-color: #ff5722;
    animation: moveRight 2s linear infinite;
}

.animation-label {
    position: absolute;
    bottom: 2px;
    right: 5px;
    font-size: 12px;
    color: #666;
}

.comparison-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.comparison-box {
    flex: 1;
    min-width: 300px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #fafafa;
}

.explanation {
    background-color: #e8f5e9;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.explanation ul {
    margin: 0;
    padding-left: 20px;
}

.explanation li {
    margin-bottom: 5px;
}

@keyframes moveRight {
    0% { left: 0; }
    100% { left: calc(100% - 50px); }
}